package com.tools.common.container;

import com.tools.common.object.BasicEnum;
import com.tools.common.object.Force;
import com.tools.common.object.Note;
import com.tools.common.object.ObjKit;

import java.util.*;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;

/**
 * 基本类型容器集合的操作工具类
 * 的封装
 * */
@Note("基本类型容器集合的操作工具类的封装")
@SuppressWarnings("unchecked")
class RowBasicKit extends RowGenericKit {

    RowBasicKit() {}

    /* *******************************************************************************************
     *
     *           int 类型
     *
     * *******************************************************************************************
     * */
    
    public static ArrayList<Integer> toArrayList(int... ints) {
        return toArrayList((Force<Integer>) null, ints);
    }

    public static ArrayList<Integer> toArrayList(Force<Integer> force, int... ints) {
        return (ArrayList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.ARRAY, force);
    }

    public static ArrayList<Integer> toArrayList(Comparator<Integer> c, int... ints) {
        return toArrayList(c, null, ints);
    }

    public static ArrayList<Integer> toArrayList(Comparator<Integer> c, Force<Integer> force, int... ints) {
        ArrayList<Integer> res = (ArrayList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }
    
    public static LinkedList<Integer> toLinkedList(int... ints) {
        return toLinkedList((Force<Integer>) null, ints);
    }

    public static LinkedList<Integer> toLinkedList(Force<Integer> force, int... ints) {
        return (LinkedList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.LINKED, force);
    }

    public static LinkedList<Integer> toLinkedList(Comparator<Integer> c, int... ints) {
        return toLinkedList(c, null, ints);
    }

    public static LinkedList<Integer> toLinkedList(Comparator<Integer> c, Force<Integer> force, int... ints) {
        LinkedList<Integer> res = (LinkedList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }
    
    public static CopyOnWriteArrayList<Integer> toCopyOnWriteArrayList(int... ints) {
        return toCopyOnWriteArrayList((Force<Integer>) null, ints);
    }

    public static CopyOnWriteArrayList<Integer> toCopyOnWriteArrayList(Force<Integer> force, int... ints) {
        return (CopyOnWriteArrayList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Integer> toCopyOnWriteArrayList(Comparator<Integer> c, int... ints) {
        return toCopyOnWriteArrayList(c, null, ints);
    }
    
    public static CopyOnWriteArrayList<Integer> toCopyOnWriteArrayList(Comparator<Integer> c, Force<Integer> force, int... ints) {
        CopyOnWriteArrayList<Integer> res = (CopyOnWriteArrayList<Integer>) private_basicTypeToList(ints, ints == null ? 0 : ints.length, BasicEnum.INT, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Integer[] toWrapperArray(int... ints) {
        return BasicEnum.toWrapperArray(ints);
    }

    public static Integer[] toWrapperArray(Force<Integer> force, int... ints) {
        return BasicEnum.toWrapperArray(force, ints);
    }

    public static int[] toBasicArray(Integer... ints) {
        return BasicEnum.toBasicArray(ints);
    }

    public static int[] toBasicArray(Force<Integer> force, Integer... ints) {
        return BasicEnum.toBasicArray(force, ints);
    }
    
    public static HashSet<Integer> toHashSet(int... ints) {
        return toHashSet(null, ints);
    }

    public static HashSet<Integer> toHashSet(Force<Integer> force, int... ints) {
        return (HashSet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Integer> toLinkedHashSet(int... ints) {
        return toLinkedHashSet(null, ints);
    }
    
    public static LinkedHashSet<Integer> toLinkedHashSet(Force<Integer> force, int... ints) {
        return (LinkedHashSet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Integer> toConcurrentHashSet(int... ints) {
        return toConcurrentHashSet(null, ints);
    }
    
    public static ConcurrentHashSet<Integer> toConcurrentHashSet(Force<Integer> force, int... ints) {
        return (ConcurrentHashSet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Integer> toCopyOnWriteArraySet(int... ints) {
        return toCopyOnWriteArraySet(null, ints);
    }
    
    public static CopyOnWriteArraySet<Integer> toCopyOnWriteArraySet(Force<Integer> force, int... ints) {
        return (CopyOnWriteArraySet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.COPY_WRITE, null, force);
    }

    
    public static TreeSet<Integer> toTreeSet(int... ints) {
        return toTreeSet(null, null, ints);
    }

    public static TreeSet<Integer> toTreeSet(Force<Integer> force, int... ints) {
        return toTreeSet(null, force, ints);
    }
    
    public static TreeSet<Integer> toTreeSet(Comparator<Integer> c, int... ints) {
        return toTreeSet(c, null, ints);
    }

    public static TreeSet<Integer> toTreeSet(Comparator<Integer> c, Force<Integer> force, int... ints) {
        return (TreeSet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Integer> toConcurrentSkipListSet(int... ints) {
        return toConcurrentSkipListSet(null, null, ints);
    }

    public static ConcurrentSkipListSet<Integer> toConcurrentSkipListSet(Force<Integer> force, int... ints) {
        return toConcurrentSkipListSet(null, force, ints);
    }

    public static ConcurrentSkipListSet<Integer> toConcurrentSkipListSet(Comparator<Integer> c, int... ints) {
        return toConcurrentSkipListSet(c, null, ints);
    }

    public static ConcurrentSkipListSet<Integer> toConcurrentSkipListSet(Comparator<Integer> c, Force<Integer> force, int... ints) {
        return (ConcurrentSkipListSet<Integer>) private_basicTypeToSet(ints, ints == null ? 0 : ints.length, BasicEnum.INT, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Integer> source, int[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Integer> source, int[] target, Force<Integer> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.INT, source, target, target.length, force);
    }

    public static void copy(int[] source, Collection<Integer> target) {
        copy(source, target, null);
    }

    public static void copy(int[] source, Collection<Integer> target, Force<Integer> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (int i : source) target.add(i);
        else for (int i : source) { Integer o = force.force(i); target.add(o == null ? 0 : o);}
    }

    public static void copy(int[] source, OwnRows<Integer> target) {
        copy(source, target, null);
    }

    public static void copy(int[] source, OwnRows<Integer> target, Force<Integer> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (int i : source) { Integer o = force.force(i); target.add(o == null ? 0 : o);}
        else for (int i : source) target.add(i);
    }

    public static void copy(int[] source, int[] target) {
        copy(source, target, null);
    }

    public static void copy(int[] source, int[] target, Force<Integer> force) {
        if(source == null || source.length == 0 || target == null || target.length == 0) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.INT, Math.min(source.length, target.length));
    }

    public static void copy(int[] source, Integer[] target) {
        copy(source, target, null);
    }

    public static void copy(int[] source, Integer[] target, Force<Integer> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.INT, force);
    }

    public static void copy(Integer[] source, int[] target) {
        copy(source, target, null);
    }

    public static void copy(Integer[] source, int[] target, Force<Integer> force) {
        if(source == null || source.length == 0 || target == null || target.length == 0) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.INT, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           long 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Long> toArrayList(long... longs) {
        return toArrayList((Force<Long>) null, longs);
    }
    
    public static ArrayList<Long> toArrayList(Force<Long> force, long... longs) {
        return (ArrayList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.ARRAY, force);
    }

    public static ArrayList<Long> toArrayList(Comparator<Long> c, long... longs) {
        return toArrayList(c, null, longs);
    }
    
    public static ArrayList<Long> toArrayList(Comparator<Long> c, Force<Long> force, long... longs) {
        ArrayList<Long> res = (ArrayList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    
    public static LinkedList<Long> toLinkedList(long... longs) {
        return toLinkedList((Force<Long>) null, longs);
    }

    public static LinkedList<Long> toLinkedList(Force<Long> force, long... longs) {
        return (LinkedList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.LINKED, force);
    }

    public static LinkedList<Long> toLinkedList(Comparator<Long> c, long... longs) {
        return toLinkedList(c, null, longs);
    }
    
    public static LinkedList<Long> toLinkedList(Comparator<Long> c, Force<Long> force, long... longs) {
        LinkedList<Long> res = (LinkedList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }


    public static CopyOnWriteArrayList<Long> toCopyOnWriteArrayList(long... longs) {
        return toCopyOnWriteArrayList((Force<Long>) null, longs);
    }
    
    public static CopyOnWriteArrayList<Long> toCopyOnWriteArrayList(Force<Long> force, long... longs) {
        return (CopyOnWriteArrayList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Long> toCopyOnWriteArrayList(Comparator<Long> c, long... longs) {
        return toCopyOnWriteArrayList(c, null, longs);
    }
    
    public static CopyOnWriteArrayList<Long> toCopyOnWriteArrayList(Comparator<Long> c, Force<Long> force, long... longs) {
        CopyOnWriteArrayList<Long> res = (CopyOnWriteArrayList<Long>) private_basicTypeToList(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Long[] toWrapperArray(long... longs) {
        return BasicEnum.toWrapperArray(longs);
    }

    public static Long[] toWrapperArray(Force<Long> force, long... longs) {
        return BasicEnum.toWrapperArray(force, longs);
    }

    public static long[] toBasicArray(Long... longs) {
        return BasicEnum.toBasicArray(longs);
    }

    public static long[] toBasicArray(Force<Long> force, Long... longs) {
        return BasicEnum.toBasicArray(force, longs);
    }

    public static HashSet<Long> toHashSet(long... longs) {
        return toHashSet(null, longs);
    }

    public static HashSet<Long> toHashSet(Force<Long> force, long... longs) {
        return (HashSet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Long> toLinkedHashSet(long... longs) {
        return toLinkedHashSet(null, longs);
    }
    
    public static LinkedHashSet<Long> toLinkedHashSet(Force<Long> force, long... longs) {
        return (LinkedHashSet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Long> toConcurrentHashSet(long... longs) {
        return toConcurrentHashSet(null, longs);
    }
    
    public static ConcurrentHashSet<Long> toConcurrentHashSet(Force<Long> force, long... longs) {
        return (ConcurrentHashSet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Long> toCopyOnWriteArraySet(long... longs) {
        return toCopyOnWriteArraySet(null, longs);
    }
    
    public static CopyOnWriteArraySet<Long> toCopyOnWriteArraySet(Force<Long> force, long... longs) {
        return (CopyOnWriteArraySet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Long> toTreeSet(long... longs) {
        return toTreeSet(null, null, longs);
    }
    
    public static TreeSet<Long> toTreeSet(Force<Long> force, long... longs) {
        return toTreeSet(null, force, longs);
    }

    
    public static TreeSet<Long> toTreeSet(Comparator<Long> c, long... longs) {
        return toTreeSet(c, null, longs);
    }

    public static TreeSet<Long> toTreeSet(Comparator<Long> c, Force<Long> force, long... longs) {
        return (TreeSet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.TREE, c, force);
    }


    public static ConcurrentSkipListSet<Long> toConcurrentSkipListSet(long... longs) {
        return toConcurrentSkipListSet(null, null, longs);
    }

    public static ConcurrentSkipListSet<Long> toConcurrentSkipListSet(Force<Long> force, long... longs) {
        return toConcurrentSkipListSet(null, force, longs);
    }


    public static ConcurrentSkipListSet<Long> toConcurrentSkipListSet(Comparator<Long> c, long... longs) {
        return toConcurrentSkipListSet(c, null, longs);
    }

    
    public static ConcurrentSkipListSet<Long> toConcurrentSkipListSet(Comparator<Long> c, Force<Long> force, long... longs) {
        return (ConcurrentSkipListSet<Long>) private_basicTypeToSet(longs, longs == null ? 0 : longs.length, BasicEnum.LONG, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Long> source, long[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Long> source, long[] target, Force<Long> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.LONG, source, target, target.length, force);
    }

    public static void copy(long[] source, Collection<Long> target) {
        copy(source, target, null);
    }

    public static void copy(long[] source, Collection<Long> target, Force<Long> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (long i : source) target.add(i);
        else for (long i : source) { Long o = force.force(i); target.add(o == null ? 0 : o);}
    }

    public static void copy(long[] source, OwnRows<Long> target) {
        copy(source, target, null);
    }

    public static void copy(long[] source, OwnRows<Long> target, Force<Long> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (long l : source) { Long o = force.force(l); target.add(o == null ? 0 : o);}
        else for (long l : source) target.add(l);
    }

    public static void copy(long[] source, long[] target) {
        copy(source, target, null);
    }

    public static void copy(long[] source, long[] target, Force<Long> force) {
        if(source == null || source.length == 0 || target == null || target.length == 0) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.LONG, Math.min(source.length, target.length));
    }

    public static void copy(long[] source, Long[] target) {
        copy(source, target, null);
    }

    public static void copy(long[] source, Long[] target, Force<Long> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.LONG, force);
    }

    public static void copy(Long[] source, long[] target) {
        copy(source, target, null);
    }

    public static void copy(Long[] source, long[] target, Force<Long> force) {
        if(source == null || source.length == 0 || target == null || target.length == 0) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.LONG, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           double 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Double> toArrayList(double... doubles) {
        return toArrayList((Force<Double>) null, doubles);
    }
    
    public static ArrayList<Double> toArrayList(Force<Double> force, double... doubles) {
        return (ArrayList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.ARRAY, force);
    }

    public static ArrayList<Double> toArrayList(Comparator<Double> c, double... doubles) {
        return toArrayList(c, null, doubles);
    }
    
    public static ArrayList<Double> toArrayList(Comparator<Double> c, Force<Double> force, double... doubles) {
        ArrayList<Double> res = (ArrayList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Double> toLinkedList(double... doubles) {
        return toLinkedList((Force<Double>) null, doubles);
    }
    
    public static LinkedList<Double> toLinkedList(Force<Double> force, double... doubles) {
        return (LinkedList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.LINKED, force);
    }

    public static LinkedList<Double> toLinkedList(Comparator<Double> c, double... doubles) {
        return toLinkedList(c, null, doubles);
    }
    
    public static LinkedList<Double> toLinkedList(Comparator<Double> c, Force<Double> force, double... doubles) {
        LinkedList<Double> res = (LinkedList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Double> toCopyOnWriteArrayList(double... doubles) {
        return toCopyOnWriteArrayList((Force<Double>) null, doubles);
    }
    
    public static CopyOnWriteArrayList<Double> toCopyOnWriteArrayList(Force<Double> force, double... doubles) {
        return (CopyOnWriteArrayList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Double> toCopyOnWriteArrayList(Comparator<Double> c, double... doubles) {
        return toCopyOnWriteArrayList(c, null, doubles);
    }
    
    public static CopyOnWriteArrayList<Double> toCopyOnWriteArrayList(Comparator<Double> c, Force<Double> force, double... doubles) {
        CopyOnWriteArrayList<Double> res = (CopyOnWriteArrayList<Double>) private_basicTypeToList(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Double[] toWrapperArray(double... doubles) {
        return BasicEnum.toWrapperArray(doubles);
    }

    public static Double[] toWrapperArray(Force<Double> force, double... doubles) {
        return BasicEnum.toWrapperArray(force, doubles);
    }

    public static double[] toBasicArray(Double... doubles) {
        return BasicEnum.toBasicArray(doubles);
    }

    public static double[] toBasicArray(Force<Double> force, Double... doubles) {
        return BasicEnum.toBasicArray(force, doubles);
    }

    public static HashSet<Double> toHashSet(double... doubles) {
        return toHashSet(null, doubles);
    }
    
    public static HashSet<Double> toHashSet(Force<Double> force, double... doubles) {
        return (HashSet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Double> toLinkedHashSet(double... doubles) {
        return toLinkedHashSet(null, doubles);
    }
    
    public static LinkedHashSet<Double> toLinkedHashSet(Force<Double> force, double... doubles) {
        return (LinkedHashSet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Double> toConcurrentHashSet(double... doubles) {
        return toConcurrentHashSet(null, doubles);
    }
    
    public static ConcurrentHashSet<Double> toConcurrentHashSet(Force<Double> force, double... doubles) {
        return (ConcurrentHashSet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Double> toCopyOnWriteArraySet(double... doubles) {
        return toCopyOnWriteArraySet(null, doubles);
    }
    
    public static CopyOnWriteArraySet<Double> toCopyOnWriteArraySet(Force<Double> force, double... doubles) {
        return (CopyOnWriteArraySet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Double> toTreeSet(double... doubles) {
        return toTreeSet(null, null, doubles);
    }
    
    public static TreeSet<Double> toTreeSet(Force<Double> force, double... doubles) {
        return toTreeSet(null, force, doubles);
    }
    
    public static TreeSet<Double> toTreeSet(Comparator<Double> c, double... doubles) {
        return toTreeSet(c, null, doubles);
    }

    public static TreeSet<Double> toTreeSet(Comparator<Double> c, Force<Double> force, double... doubles) {
        return (TreeSet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.TREE, c, force);
    }

    
    public static ConcurrentSkipListSet<Double> toConcurrentSkipListSet(double... doubles) {
        return toConcurrentSkipListSet(null, null, doubles);
    }

    public static ConcurrentSkipListSet<Double> toConcurrentSkipListSet(Force<Double> force, double... doubles) {
        return toConcurrentSkipListSet(null, force, doubles);
    }

    public static ConcurrentSkipListSet<Double> toConcurrentSkipListSet(Comparator<Double> c, double... doubles) {
        return toConcurrentSkipListSet(c, null, doubles);
    }
    
    public static ConcurrentSkipListSet<Double> toConcurrentSkipListSet(Comparator<Double> c, Force<Double> force, double... doubles) {
        return (ConcurrentSkipListSet<Double>) private_basicTypeToSet(doubles, doubles == null ? 0 : doubles.length, BasicEnum.DOUBLE, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Double> source, double[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Double> source, double[] target, Force<Double> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.DOUBLE, source, target, target.length, force);
    }

    public static void copy(double[] source, Collection<Double> target) {
        copy(source, target, null);
    }

    public static void copy(double[] source, Collection<Double> target, Force<Double> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (double d : source) target.add(d);
        else for (double d : source) { Double o = force.force(d); target.add(o == null ? 0.0 : o);}
    }

    public static void copy(double[] source, OwnRows<Double> target) {
        copy(source, target, null);
    }

    public static void copy(double[] source, OwnRows<Double> target, Force<Double> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (double d : source) { Double o = force.force(d); target.add(o == null ? 0.0 : o);}
        else for (double d : source) target.add(d);
    }

    public static void copy(double[] source, double[] target) {
        copy(source, target, null);
    }

    public static void copy(double[] source, double[] target, Force<Double> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source,target, force, false, BasicEnum.DOUBLE, Math.min(source.length, target.length));
    }

    public static void copy(double[] source, Double[] target) {
        copy(source, target, null);
    }

    public static void copy(double[] source, Double[] target, Force<Double> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.DOUBLE, force);
    }

    public static void copy(Double[] source, double[] target) {
        copy(source, target, null);
    }

    public static void copy(Double[] source, double[] target, Force<Double> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source,target, force, true, BasicEnum.DOUBLE, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           float 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Float> toArrayList(float... floats) {
        return toArrayList((Force<Float>) null, floats);
    }

    public static ArrayList<Float> toArrayList(Force<Float> force, float... floats) {
        return (ArrayList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.ARRAY, force);
    }

    public static ArrayList<Float> toArrayList(Comparator<Float> c, float... floats) {
        return toArrayList(c, null, floats);
    }

    public static ArrayList<Float> toArrayList(Comparator<Float> c, Force<Float> force, float... floats) {
        ArrayList<Float> res = (ArrayList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Float> toLinkedList(float... floats) {
        return toLinkedList((Force<Float>) null, floats);
    }

    public static LinkedList<Float> toLinkedList(Force<Float> force, float... floats) {
        return (LinkedList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.LINKED, force);
    }

    public static LinkedList<Float> toLinkedList(Comparator<Float> c, float... floats){
        return toLinkedList(c, null, floats);
    }

    public static LinkedList<Float> toLinkedList(Comparator<Float> c, Force<Float> force, float... floats) {
        LinkedList<Float> res = (LinkedList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Float> toCopyOnWriteArrayList(float... floats) {
        return toCopyOnWriteArrayList((Force<Float>) null, floats);
    }

    public static CopyOnWriteArrayList<Float> toCopyOnWriteArrayList(Force<Float> force, float... floats) {
        return (CopyOnWriteArrayList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Float> toCopyOnWriteArrayList(Comparator<Float> c, float... floats) {
        return toCopyOnWriteArrayList(c, null, floats);
    }

    public static CopyOnWriteArrayList<Float> toCopyOnWriteArrayList(Comparator<Float> c, Force<Float> force, float... floats) {
        CopyOnWriteArrayList<Float> res = (CopyOnWriteArrayList<Float>) private_basicTypeToList(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Float[] toWrapperArray(float... floats) {
        return BasicEnum.toWrapperArray(floats);
    }

    public static Float[] toWrapperArray(Force<Float> force, float... floats) {
        return BasicEnum.toWrapperArray(force, floats);
    }

    public static float[] toBasicArray(Float... floats) {
        return BasicEnum.toBasicArray(floats);
    }

    public static float[] toBasicArray(Force<Float> force, Float... floats) {
        return BasicEnum.toBasicArray(force, floats);
    }

    public static HashSet<Float> toHashSet(float... floats) {
        return toHashSet(null, floats);
    }

    public static HashSet<Float> toHashSet(Force<Float> force, float... floats) {
        return (HashSet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Float> toLinkedHashSet(float... floats) {
        return toLinkedHashSet(null, floats);
    }

    public static LinkedHashSet<Float> toLinkedHashSet(Force<Float> force, float... floats) {
        return (LinkedHashSet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Float> toConcurrentHashSet(float... floats) {
        return toConcurrentHashSet(null, floats);
    }

    public static ConcurrentHashSet<Float> toConcurrentHashSet(Force<Float> force, float... floats) {
        return (ConcurrentHashSet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Float> toCopyOnWriteArraySet(float... floats) {
        return toCopyOnWriteArraySet(null, floats);
    }

    public static CopyOnWriteArraySet<Float> toCopyOnWriteArraySet(Force<Float> force, float... floats) {
        return (CopyOnWriteArraySet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Float> toTreeSet(float... floats) {
        return toTreeSet(null, null, floats);
    }

    public static TreeSet<Float> toTreeSet(Force<Float> force, float... floats) {
        return toTreeSet(null, force, floats);
    }

    public static TreeSet<Float> toTreeSet(Comparator<Float> c, float... floats) {
        return toTreeSet(c, null, floats);
    }

    public static TreeSet<Float> toTreeSet(Comparator<Float> c, Force<Float> force, float... floats) {
        return (TreeSet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Float> toConcurrentSkipListSet(float... floats) {
        return toConcurrentSkipListSet(null, null, floats);
    }

    public static ConcurrentSkipListSet<Float> toConcurrentSkipListSet(Force<Float> force, float... floats) {
        return toConcurrentSkipListSet(null, force, floats);
    }

    public static ConcurrentSkipListSet<Float> toConcurrentSkipListSet(Comparator<Float> c, float... floats) {
        return toConcurrentSkipListSet(c, null, floats);
    }

    public static ConcurrentSkipListSet<Float> toConcurrentSkipListSet(Comparator<Float> c, Force<Float> force, float... floats) {
        return (ConcurrentSkipListSet<Float>) private_basicTypeToSet(floats, floats == null ? 0 : floats.length, BasicEnum.FLOAT, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Float> source, float[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Float> source, float[] target, Force<Float> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.FLOAT, source, target, target.length, force);
    }

    public static void copy(float[] source, Collection<Float> target) {
        copy(source, target, null);
    }

    public static void copy(float[] source, Collection<Float> target, Force<Float> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (float f : source) target.add(f);
        else for (float f : source) { Float o = force.force(f); target.add(o == null ? 0.0f : o);}
    }

    public static void copy(float[] source, OwnRows<Float> target) {
        copy(source, target, null);
    }

    public static void copy(float[] source, OwnRows<Float> target, Force<Float> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (float f : source) { Float o = force.force(f); target.add(o == null ? 0.0f : o);}
        else for (float f : source) target.add(f);
    }

    public static void copy(float[] source, float[] target) {
        copy(source, target, null);
    }

    public static void copy(float[] source, float[] target, Force<Float> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.FLOAT, Math.min(source.length, target.length));
    }

    public static void copy(float[] source, Float[] target) {
        copy(source, target, null);
    }

    public static void copy(float[] source, Float[] target, Force<Float> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.FLOAT, force);
    }

    public static void copy(Float[] source, float[] target) {
        copy(source, target, null);
    }

    public static void copy(Float[] source, float[] target, Force<Float> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.FLOAT, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           char 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Character> toArrayList(char... chars) {
        return toArrayList((Force<Character>) null, chars);
    }

    public static ArrayList<Character> toArrayList(Force<Character> force, char... chars) {
        return (ArrayList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.ARRAY, force);
    }

    public static ArrayList<Character> toArrayList(Comparator<Character> c, char... chars) {
        return toArrayList(c, null, chars);
    }

    public static ArrayList<Character> toArrayList(Comparator<Character> c, Force<Character> force, char... chars) {
        ArrayList<Character> res = (ArrayList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Character> toLinkedList(char... chars) {
        return toLinkedList((Force<Character>) null, chars);
    }

    public static LinkedList<Character> toLinkedList(Force<Character> force, char... chars) {
        return (LinkedList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.LINKED, force);
    }

    public static LinkedList<Character> toLinkedList(Comparator<Character> c, char... chars) {
        return toLinkedList(c, null, chars);
    }

    public static LinkedList<Character> toLinkedList(Comparator<Character> c, Force<Character> force, char... chars) {
        LinkedList<Character> res = (LinkedList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Character> toCopyOnWriteArrayList(char... chars) {
        return toCopyOnWriteArrayList((Force<Character>) null, chars);
    }

    public static CopyOnWriteArrayList<Character> toCopyOnWriteArrayList(Force<Character> force, char... chars) {
        return (CopyOnWriteArrayList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Character> toCopyOnWriteArrayList(Comparator<Character> c, char... chars) {
        return toCopyOnWriteArrayList(c, null, chars);
    }

    public static CopyOnWriteArrayList<Character> toCopyOnWriteArrayList(Comparator<Character> c, Force<Character> force, char... chars) {
        CopyOnWriteArrayList<Character> res = (CopyOnWriteArrayList<Character>) private_basicTypeToList(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Character[] toWrapperArray(char... chars) {
        return BasicEnum.toWrapperArray(chars);
    }

    public static Character[] toWrapperArray(Force<Character> force, char... chars) {
        return BasicEnum.toWrapperArray(force, chars);
    }

    public static char[] toBasicArray(Character... chars) {
        return BasicEnum.toBasicArray(chars);
    }

    public static char[] toBasicArray(Force<Character> force, Character... chars) {
        return BasicEnum.toBasicArray(force, chars);
    }

    public static HashSet<Character> toHashSet(char... chars) {
        return toHashSet(null, chars);
    }

    public static HashSet<Character> toHashSet(Force<Character> force, char... chars) {
        return (HashSet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Character> toLinkedHashSet(char... chars) {
        return toLinkedHashSet(null, chars);
    }

    public static LinkedHashSet<Character> toLinkedHashSet(Force<Character> force, char... chars) {
        return (LinkedHashSet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Character> toConcurrentHashSet(char... chars) {
        return toConcurrentHashSet(null, chars);
    }

    public static ConcurrentHashSet<Character> toConcurrentHashSet(Force<Character> force, char... chars) {
        return (ConcurrentHashSet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Character> toCopyOnWriteArraySet(char... chars) {
        return toCopyOnWriteArraySet(null, chars);
    }

    public static CopyOnWriteArraySet<Character> toCopyOnWriteArraySet(Force<Character> force, char... chars) {
        return (CopyOnWriteArraySet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Character> toTreeSet(char... chars) {
        return toTreeSet(null, null, chars);
    }

    public static TreeSet<Character> toTreeSet(Force<Character> force, char... chars) {
        return toTreeSet(null, force, chars);
    }

    public static TreeSet<Character> toTreeSet(Comparator<Character> c, char... chars) {
        return toTreeSet(c, null, chars);
    }

    public static TreeSet<Character> toTreeSet(Comparator<Character> c, Force<Character> force, char... chars) {
        return (TreeSet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Character> toConcurrentSkipListSet(char... chars) {
        return toConcurrentSkipListSet(null, null, chars);
    }

    public static ConcurrentSkipListSet<Character> toConcurrentSkipListSet(Force<Character> force, char... chars) {
        return toConcurrentSkipListSet(null, force, chars);
    }

    public static ConcurrentSkipListSet<Character> toConcurrentSkipListSet(Comparator<Character> c, char... chars) {
        return toConcurrentSkipListSet(c, null, chars);
    }

    public static ConcurrentSkipListSet<Character> toConcurrentSkipListSet(Comparator<Character> c, Force<Character> force, char... chars) {
        return (ConcurrentSkipListSet<Character>) private_basicTypeToSet(chars, chars == null ? 0 : chars.length, BasicEnum.CHAR, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Character> source, char[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Character> source, char[] target, Force<Character> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.CHAR, source, target, target.length, force);
    }

    public static void copy(char[] source, Collection<Character> target) {
        copy(source, target, null);
    }

    public static void copy(char[] source, Collection<Character> target, Force<Character> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (char c : source) target.add(c);
        else for (char c : source) { Character o = force.force(c); target.add(o == null ? '\u0000' : o);}
    }

    public static void copy(char[] source, OwnRows<Character> target) {
        copy(source, target, null);
    }

    public static void copy(char[] source, OwnRows<Character> target, Force<Character> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (char c : source) { Character o = force.force(c); target.add(o == null ? '\u0000' : o);}
        else for (char c : source) target.add(c);
    }

    public static void copy(char[] source, char[] target) {
        copy(source, target, null);
    }

    public static void copy(char[] source, char[] target, Force<Character> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.CHAR, Math.min(source.length, target.length));
    }

    public static void copy(char[] source, Character[] target) {
        copy(source, target, null);
    }

    public static void copy(char[] source, Character[] target, Force<Character> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.CHAR, force);
    }

    public static void copy(Character[] source, char[] target) {
        copy(source, target, null);
    }

    public static void copy(Character[] source, char[] target, Force<Character> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.CHAR, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           byte 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Byte> toArrayList(byte... bytes) {
        return toArrayList((Force<Byte>) null, bytes);
    }

    public static ArrayList<Byte> toArrayList(Force<Byte> force, byte... bytes) {
        return (ArrayList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.ARRAY, force);
    }

    public static ArrayList<Byte> toArrayList(Comparator<Byte> c, byte... bytes) {
        return toArrayList(c, null, bytes);
    }

    public static ArrayList<Byte> toArrayList(Comparator<Byte> c, Force<Byte> force, byte... bytes) {
        ArrayList<Byte> res = (ArrayList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Byte> toLinkedList(byte... bytes) {
        return toLinkedList((Force<Byte>) null, bytes);
    }

    public static LinkedList<Byte> toLinkedList(Force<Byte> force, byte... bytes) {
        return (LinkedList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.LINKED, force);
    }

    public static LinkedList<Byte> toLinkedList(Comparator<Byte> c, byte... bytes) {
        return toLinkedList(c, null, bytes);
    }

    public static LinkedList<Byte> toLinkedList(Comparator<Byte> c, Force<Byte> force, byte... bytes) {
        LinkedList<Byte> res = (LinkedList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Byte> toCopyOnWriteArrayList(byte... bytes) {
        return toCopyOnWriteArrayList((Force<Byte>) null, bytes);
    }

    public static CopyOnWriteArrayList<Byte> toCopyOnWriteArrayList(Force<Byte> force, byte... bytes) {
        return (CopyOnWriteArrayList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Byte> toCopyOnWriteArrayList(Comparator<Byte> c, byte... bytes) {
        return toCopyOnWriteArrayList(c, null, bytes);
    }

    public static CopyOnWriteArrayList<Byte> toCopyOnWriteArrayList(Comparator<Byte> c, Force<Byte> force, byte... bytes) {
        CopyOnWriteArrayList<Byte> res = (CopyOnWriteArrayList<Byte>) private_basicTypeToList(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Byte[] toWrapperArray(byte... bytes) {
        return BasicEnum.toWrapperArray(bytes);
    }

    public static Byte[] toWrapperArray(Force<Byte> force, byte... bytes) {
        return BasicEnum.toWrapperArray(force, bytes);
    }

    public static byte[] toBasicArray(Byte... bytes) {
        return BasicEnum.toBasicArray(bytes);
    }

    public static byte[] toWrapperArray(Force<Byte> force, Byte... bytes) {
        return BasicEnum.toBasicArray(force, bytes);
    }

    public static HashSet<Byte> toHashSet(byte... bytes) {
        return toHashSet(null, bytes);
    }

    public static HashSet<Byte> toHashSet(Force<Byte> force, byte... bytes) {
        return (HashSet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Byte> toLinkedHashSet(byte... bytes) {
        return toLinkedHashSet(null, bytes);
    }

    public static LinkedHashSet<Byte> toLinkedHashSet(Force<Byte> force, byte... bytes) {
        return (LinkedHashSet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Byte> toConcurrentHashSet(byte... bytes) {
        return toConcurrentHashSet(null, bytes);
    }

    public static ConcurrentHashSet<Byte> toConcurrentHashSet(Force<Byte> force, byte... bytes) {
        return (ConcurrentHashSet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Byte> toCopyOnWriteArraySet(byte... bytes) {
        return toCopyOnWriteArraySet(null, bytes);
    }

    public static CopyOnWriteArraySet<Byte> toCopyOnWriteArraySet(Force<Byte> force, byte... bytes) {
        return (CopyOnWriteArraySet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Byte> toTreeSet(byte... bytes) {
        return toTreeSet(null, null, bytes);
    }

    public static TreeSet<Byte> toTreeSet(Force<Byte> force, byte... bytes) {
        return toTreeSet(null, force, bytes);
    }

    public static TreeSet<Byte> toTreeSet(Comparator<Byte> c, byte... bytes) {
        return toTreeSet(c, null, bytes);
    }

    public static TreeSet<Byte> toTreeSet(Comparator<Byte> c, Force<Byte> force, byte... bytes) {
        return (TreeSet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Byte> toConcurrentSkipListSet(byte... bytes) {
        return toConcurrentSkipListSet(null, null, bytes);
    }

    public static ConcurrentSkipListSet<Byte> toConcurrentSkipListSet(Force<Byte> force, byte... bytes) {
        return toConcurrentSkipListSet(null, force, bytes);
    }

    public static ConcurrentSkipListSet<Byte> toConcurrentSkipListSet(Comparator<Byte> c, byte... bytes) {
        return toConcurrentSkipListSet(c, null, bytes);
    }

    public static ConcurrentSkipListSet<Byte> toConcurrentSkipListSet(Comparator<Byte> c, Force<Byte> force, byte... bytes) {
        return (ConcurrentSkipListSet<Byte>) private_basicTypeToSet(bytes, bytes == null ? 0 : bytes.length, BasicEnum.BYTE, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Byte> source, byte[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Byte> source, byte[] target, Force<Byte> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.BYTE, source, target, target.length, force);
    }

    public static void copy(byte[] source, Collection<Byte> target) {
        copy(source, target, null);
    }

    public static void copy(byte[] source, Collection<Byte> target, Force<Byte> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (byte b : source) target.add(b);
        else for (byte b : source) { Byte o = force.force(b); target.add(o == null ? 0 : o);}
    }

    public static void copy(byte[] source, OwnRows<Byte> target) {
        copy(source, target, null);
    }

    public static void copy(byte[] source, OwnRows<Byte> target, Force<Byte> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (byte b : source) { Byte o = force.force(b); target.add(o == null ? 0 : o);}
        else for (byte b : source) target.add(b);
    }

    public static void copy(byte[] source, byte[] target) {
        copy(source, target, null);
    }

    public static void copy(byte[] source, byte[] target, Force<Byte> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.BYTE, Math.min(source.length, target.length));
    }

    public static void copy(byte[] source, Byte[] target) {
        copy(source, target, null);
    }

    public static void copy(byte[] source, Byte[] target, Force<Byte> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.BYTE, force);
    }

    public static void copy(Byte[] source, byte[] target) {
        copy(source, target, null);
    }

    public static void copy(Byte[] source, byte[] target, Force<Byte> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.BYTE, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           short 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Short> toArrayList(short... shorts) {
        return toArrayList((Force<Short>) null, shorts);
    }

    public static ArrayList<Short> toArrayList(Force<Short> force, short... shorts) {
        return (ArrayList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.ARRAY, force);
    }

    public static ArrayList<Short> toArrayList(Comparator<Short> c, short... shorts) {
        return toArrayList(c, null, shorts);
    }

    public static ArrayList<Short> toArrayList(Comparator<Short> c, Force<Short> force, short... shorts) {
        ArrayList<Short> res = (ArrayList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Short> toLinkedList(short... shorts) {
        return toLinkedList((Force<Short>) null, shorts);
    }

    public static LinkedList<Short> toLinkedList(Force<Short> force, short... shorts) {
        return (LinkedList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.LINKED, force);
    }

    public static LinkedList<Short> toLinkedList(Comparator<Short> c, short... shorts) {
        return toLinkedList(c, null, shorts);
    }

    public static LinkedList<Short> toLinkedList(Comparator<Short> c, Force<Short> force, short... shorts) {
        LinkedList<Short> res = (LinkedList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Short> toCopyOnWriteArrayList(short... shorts) {
        return toCopyOnWriteArrayList((Force<Short>) null, shorts);
    }

    public static CopyOnWriteArrayList<Short> toCopyOnWriteArrayList(Force<Short> force, short... shorts) {
        return (CopyOnWriteArrayList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Short> toCopyOnWriteArrayList(Comparator<Short> c, short... shorts) {
        return toCopyOnWriteArrayList(c, null, shorts);
    }

    public static CopyOnWriteArrayList<Short> toCopyOnWriteArrayList(Comparator<Short> c, Force<Short> force, short... shorts) {
        CopyOnWriteArrayList<Short> res = (CopyOnWriteArrayList<Short>) private_basicTypeToList(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Short[] toWrapperArray(short... shorts) {
        return BasicEnum.toWrapperArray(shorts);
    }

    public static Short[] toWrapperArray(Force<Short> force, short... shorts) {
        return BasicEnum.toWrapperArray(force, shorts);
    }

    public static short[] toBasicArray(Short... shorts) {
        return BasicEnum.toBasicArray(shorts);
    }

    public static short[] toWrapperArray(Force<Short> force, Short... shorts) {
        return BasicEnum.toBasicArray(force, shorts);
    }

    public static HashSet<Short> toHashSet(short... shorts) {
        return toHashSet(null, shorts);
    }

    public static HashSet<Short> toHashSet(Force<Short> force, short... shorts) {
        return (HashSet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Short> toLinkedHashSet(short... shorts) {
        return toLinkedHashSet(null, shorts);
    }

    public static LinkedHashSet<Short> toLinkedHashSet(Force<Short> force, short... shorts) {
        return (LinkedHashSet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Short> toConcurrentHashSet(short... shorts) {
        return toConcurrentHashSet(null, shorts);
    }

    public static ConcurrentHashSet<Short> toConcurrentHashSet(Force<Short> force, short... shorts) {
        return (ConcurrentHashSet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Short> toCopyOnWriteArraySet(short... shorts) {
        return toCopyOnWriteArraySet(null, shorts);
    }

    public static CopyOnWriteArraySet<Short> toCopyOnWriteArraySet(Force<Short> force, short... shorts) {
        return (CopyOnWriteArraySet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Short> toTreeSet(short... shorts) {
        return toTreeSet(null, null, shorts);
    }

    public static TreeSet<Short> toTreeSet(Force<Short> force, short... shorts) {
        return toTreeSet(null, force, shorts);
    }

    public static TreeSet<Short> toTreeSet(Comparator<Short> c, short... shorts) {
        return toTreeSet(c, null, shorts);
    }

    public static TreeSet<Short> toTreeSet(Comparator<Short> c, Force<Short> force, short... shorts) {
        return (TreeSet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Short> toConcurrentSkipListSet(short... shorts) {
        return toConcurrentSkipListSet(null, null, shorts);
    }

    public static ConcurrentSkipListSet<Short> toConcurrentSkipListSet(Force<Short> force, short... shorts) {
        return toConcurrentSkipListSet(null, force, shorts);
    }

    public static ConcurrentSkipListSet<Short> toConcurrentSkipListSet(Comparator<Short> c, short... shorts) {
        return toConcurrentSkipListSet(c, null, shorts);
    }

    public static ConcurrentSkipListSet<Short> toConcurrentSkipListSet(Comparator<Short> c, Force<Short> force, short... shorts) {
        return (ConcurrentSkipListSet<Short>) private_basicTypeToSet(shorts, shorts == null ? 0 : shorts.length, BasicEnum.SHORT, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Short> source, short[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Short> source, short[] target, Force<Short> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.SHORT, source, target, target.length, force);
    }

    public static void copy(short[] source, Collection<Short> target) {
        copy(source, target, null);
    }

    public static void copy(short[] source, Collection<Short> target, Force<Short> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (short s : source) target.add(s);
        else for (short s : source) { Short o = force.force(s); target.add(o == null ? 0 : o);}
    }

    public static void copy(short[] source, OwnRows<Short> target) {
        copy(source, target, null);
    }

    public static void copy(short[] source, OwnRows<Short> target, Force<Short> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (short s : source) { Short o = force.force(s); target.add(o == null ? 0 : o);}
        else for (short s : source) target.add(s);
    }

    public static void copy(short[] source, short[] target) {
        copy(source, target, null);
    }

    public static void copy(short[] source, short[] target, Force<Short> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.SHORT, Math.min(source.length, target.length));
    }

    public static void copy(short[] source, Short[] target) {
        copy(source, target, null);
    }

    public static void copy(short[] source, Short[] target, Force<Short> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.SHORT, force);
    }

    public static void copy(Short[] source, short[] target) {
        copy(source, target, null);
    }

    public static void copy(Short[] source, short[] target, Force<Short> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.SHORT, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           boolean 类型
     *
     * *******************************************************************************************
     * */

    public static ArrayList<Boolean> toArrayList(boolean... booleans) {
        return toArrayList((Force<Boolean>) null, booleans);
    }

    public static ArrayList<Boolean> toArrayList(Force<Boolean> force, boolean... booleans) {
        return (ArrayList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.ARRAY, force);
    }

    public static ArrayList<Boolean> toArrayList(Comparator<Boolean> c, boolean... booleans) {
        return toArrayList(c, null, booleans);
    }

    public static ArrayList<Boolean> toArrayList(Comparator<Boolean> c, Force<Boolean> force, boolean... booleans) {
        ArrayList<Boolean> res = (ArrayList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.ARRAY, force);
        res.sort(c);
        return res;
    }

    public static LinkedList<Boolean> toLinkedList(boolean... booleans) {
        return toLinkedList((Force<Boolean>) null, booleans);
    }

    public static LinkedList<Boolean> toLinkedList(Force<Boolean> force, boolean... booleans) {
        return (LinkedList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.LINKED, force);
    }

    public static LinkedList<Boolean> toLinkedList(Comparator<Boolean> c, boolean... booleans) {
        return toLinkedList(c, null, booleans);
    }

    public static LinkedList<Boolean> toLinkedList(Comparator<Boolean> c, Force<Boolean> force, boolean... booleans) {
        LinkedList<Boolean> res = (LinkedList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.LINKED, force);
        res.sort(c);
        return res;
    }

    public static CopyOnWriteArrayList<Boolean> toCopyOnWriteArrayList(boolean... booleans) {
        return toCopyOnWriteArrayList((Force<Boolean>) null, booleans);
    }

    public static CopyOnWriteArrayList<Boolean> toCopyOnWriteArrayList(Force<Boolean> force, boolean... booleans) {
        return (CopyOnWriteArrayList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.COPY_WRITE, force);
    }

    public static CopyOnWriteArrayList<Boolean> toCopyOnWriteArrayList(Comparator<Boolean> c, boolean... booleans) {
        return toCopyOnWriteArrayList(c, null, booleans);
    }

    public static CopyOnWriteArrayList<Boolean> toCopyOnWriteArrayList(Comparator<Boolean> c, Force<Boolean> force, boolean... booleans) {
        CopyOnWriteArrayList<Boolean> res = (CopyOnWriteArrayList<Boolean>) private_basicTypeToList(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, ListEnum.COPY_WRITE, force);
        res.sort(c);
        return res;
    }

    public static Boolean[] toWrapperArray(boolean... booleans) {
        return BasicEnum.toWrapperArray(booleans);
    }

    public static Boolean[] toWrapperArray(Force<Boolean> force, boolean... booleans) {
        return BasicEnum.toWrapperArray(force, booleans);
    }

    public static boolean[] toBasicArray(Boolean... booleans) {
        return BasicEnum.toBasicArray(booleans);
    }

    public static boolean[] toBasicArray(Force<Boolean> force, Boolean... booleans) {
        return BasicEnum.toBasicArray(force, booleans);
    }

    public static HashSet<Boolean> toHashSet(boolean... booleans) {
        return toHashSet(null, booleans);
    }

    public static HashSet<Boolean> toHashSet(Force<Boolean> force, boolean... booleans) {
        return (HashSet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.HASH, null, force);
    }

    public static LinkedHashSet<Boolean> toLinkedHashSet(boolean... booleans) {
        return toLinkedHashSet(null, booleans);
    }

    public static LinkedHashSet<Boolean> toLinkedHashSet(Force<Boolean> force, boolean... booleans) {
        return (LinkedHashSet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.LINKED, null, force);
    }

    public static ConcurrentHashSet<Boolean> toConcurrentHashSet(boolean... booleans) {
        return toConcurrentHashSet(null, booleans);
    }

    public static ConcurrentHashSet<Boolean> toConcurrentHashSet(Force<Boolean> force, boolean... booleans) {
        return (ConcurrentHashSet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.CONCURRENT, null, force);
    }

    public static CopyOnWriteArraySet<Boolean> toCopyOnWriteArraySet(boolean... booleans) {
        return toCopyOnWriteArraySet(null, booleans);
    }

    public static CopyOnWriteArraySet<Boolean> toCopyOnWriteArraySet(Force<Boolean> force, boolean... booleans) {
        return (CopyOnWriteArraySet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.COPY_WRITE, null, force);
    }

    public static TreeSet<Boolean> toTreeSet(boolean... booleans) {
        return toTreeSet(null, null, booleans);
    }

    public static TreeSet<Boolean> toTreeSet(Force<Boolean> force, boolean... booleans) {
        return toTreeSet(null, force, booleans);
    }

    public static TreeSet<Boolean> toTreeSet(Comparator<Boolean> c, boolean... booleans) {
        return toTreeSet(c, null, booleans);
    }

    public static TreeSet<Boolean> toTreeSet(Comparator<Boolean> c, Force<Boolean> force, boolean... booleans) {
        return (TreeSet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.TREE, c, force);
    }

    public static ConcurrentSkipListSet<Boolean> toConcurrentSkipListSet(boolean... booleans) {
        return toConcurrentSkipListSet(null, null, booleans);
    }

    public static ConcurrentSkipListSet<Boolean> toConcurrentSkipListSet(Force<Boolean> force, boolean... booleans) {
        return toConcurrentSkipListSet(null, force, booleans);
    }

    public static ConcurrentSkipListSet<Boolean> toConcurrentSkipListSet(Comparator<Boolean> c, boolean... booleans) {
        return toConcurrentSkipListSet(c, null, booleans);
    }

    public static ConcurrentSkipListSet<Boolean> toConcurrentSkipListSet(Comparator<Boolean> c, Force<Boolean> force, boolean... booleans) {
        return (ConcurrentSkipListSet<Boolean>) private_basicTypeToSet(booleans, booleans == null ? 0 : booleans.length, BasicEnum.BOOLEAN, SetEnum.SKIP_LIST, c, force);
    }

    public static void copy(Iterable<Boolean> source, boolean[] target) {
        copy(source, target, null);
    }

    public static void copy(Iterable<Boolean> source, boolean[] target, Force<Boolean> force) {
        if(source == null || target == null) return;
        private_copyTo(BasicEnum.BOOLEAN, source, target, target.length, force);
    }

    public static void copy(boolean[] source, Collection<Boolean> target) {
        copy(source, target, null);
    }

    public static void copy(boolean[] source, Collection<Boolean> target, Force<Boolean> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force == null) for (boolean b : source) target.add(b);
        else for (boolean b : source) { Boolean o = force.force(b); target.add(o != null && o);}
    }

    public static void copy(boolean[] source, OwnRows<Boolean> target) {
        copy(source, target, null);
    }

    public static void copy(boolean[] source, OwnRows<Boolean> target, Force<Boolean> force) {
        if(source == null || source.length == 0 || target == null) return;
        if(force != null) for (boolean b : source) { Boolean o = force.force(b); target.add(o != null && o);}
        else for (boolean b : source) target.add(b);
    }

    public static void copy(boolean[] source, boolean[] target) {
        copy(source, target, null);
    }

    public static void copy(boolean[] source, boolean[] target, Force<Boolean> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, false, BasicEnum.BOOLEAN, Math.min(source.length, target.length));
    }

    public static void copy(boolean[] source, Boolean[] target) {
        copy(source, target, null);
    }

    public static void copy(boolean[] source, Boolean[] target, Force<Boolean> force) {
        if(source == null || target == null) return;
        private_baseCopyToWrapper(source, target, Math.min(source.length, target.length), BasicEnum.BOOLEAN, force);
    }

    public static void copy(Boolean[] source, boolean[] target) {
        copy(source, target, null);
    }

    public static void copy(Boolean[] source, boolean[] target, Force<Boolean> force) {
        if(source == null || target == null) return;
        private_copyToBasicArray(source, target, force, true, BasicEnum.BOOLEAN, Math.min(source.length, target.length));
    }

    /* *******************************************************************************************
     *
     *           私有逻辑
     *
     * *******************************************************************************************
     * */


    @Note("基本类型数组转为 List 集合的逻辑")
    private static List<?> private_basicTypeToList(Object array, int length, BasicEnum basic, ListEnum type, Force force) {
        if(length == 0) return type.newList(0);
        if(type != ListEnum.COPY_WRITE) {
            List<?> results = type.newList(length);
            private_collectionAddOperation(array, basic, results, force);
            return results;
        }
        switch (basic) {
            case INT: {
                int[] is = (int[]) array;
                Integer[] integers = BasicEnum.toWrapperArray(force, is);
                return new CopyOnWriteArrayList<>(Arrays.asList(integers));
            }
            case LONG: {
                long[] ls = (long[]) array;
                Long[] longs = BasicEnum.toWrapperArray(force, ls);
                return new CopyOnWriteArrayList<>(Arrays.asList(longs));
            }
            case DOUBLE: {
                double[] ds = (double[]) array;
                Double[] doubles = BasicEnum.toWrapperArray(force, ds);
                return new CopyOnWriteArrayList<>(Arrays.asList(doubles));
            }
            case FLOAT: {
                float[] fs = (float[]) array;
                Float[] floats = BasicEnum.toWrapperArray(force, fs);
                return new CopyOnWriteArrayList<>(Arrays.asList(floats));
            }
            case CHAR: {
                char[] cs = (char[]) array;
                Character[] chars = BasicEnum.toWrapperArray(force, cs);
                return new CopyOnWriteArrayList<>(Arrays.asList(chars));
            }
            case BYTE: {
                byte[] bs = (byte[]) array;
                Byte[] bytes = BasicEnum.toWrapperArray(force, bs);
                return new CopyOnWriteArrayList<>(Arrays.asList(bytes));
            }
            case SHORT: {
                short[] ss = (short[]) array;
                Short[] shorts = BasicEnum.toWrapperArray(force, ss);
                return new CopyOnWriteArrayList<>(Arrays.asList(shorts));
            }
            case BOOLEAN: {
                boolean[] bs = (boolean[]) array;
                Boolean[] booleans = BasicEnum.toWrapperArray(force, bs);
                return new CopyOnWriteArrayList<>(Arrays.asList(booleans));
            }
            default: return new CopyOnWriteArrayList<>();
        }
    }

    @Note("将基本类型数组的元素复制到 Collection 集合的操作")
    private static void private_collectionAddOperation(Object array, BasicEnum basic, Collection results, Force force) {
        switch (basic) {
            case INT: {
                int[] is = (int[]) array;
                if(force == null) {
                    for(int i : is) results.add(i);
                    return;
                }
                for(int i : is) results.add(force.force(i));
            } break;
            case LONG: {
                long[] ls = (long[]) array;
                if(force == null) {
                    for(long l : ls) results.add(l);
                    return;
                }
                for(long l : ls) results.add(force.force(l));
            } break;
            case DOUBLE: {
                double[] ds = (double[]) array;
                if(force == null) {
                    for(double d : ds) results.add(d);
                    return;
                }
                for(double d : ds) results.add(force.force(d));
            } break;
            case FLOAT: {
                float[] fs = (float[]) array;
                if(force == null) {
                    for(float f : fs) results.add(f);
                    return;
                }
                for(float f : fs) results.add(force.force(f));
            } break;
            case CHAR: {
                char[] cs = (char[]) array;
                if(force == null) {
                    for(char c : cs) results.add(c);
                    return;
                }
                for(char c : cs) results.add(force.force(c));
            } break;
            case BYTE: {
                byte[] bs = (byte[]) array;
                if(force == null) {
                    for(byte b : bs) results.add(b);
                    return;
                }
                for(byte b : bs) results.add(force.force(b));
            } break;
            case SHORT: {
                short[] ss = (short[]) array;
                if(force == null) {
                    for(short s : ss) results.add(s);
                    return;
                }
                for(short s : ss) results.add(force.force(s));
            } break;
            case BOOLEAN: {
                boolean[] bs = (boolean[]) array;
                if(force == null) {
                    for(boolean b : bs) results.add(b);
                    return;
                }
                for(boolean b : bs) results.add(force.force(b));
            } break;
        }
    }



    @Note("基本类型数组转为 Set 集合的逻辑")
    private static Set<?> private_basicTypeToSet(Object array, int length, BasicEnum basic, SetEnum type, Comparator c, Force force) {
        if(length == 0) return type.newSet(0, c);
        if(type != SetEnum.COPY_WRITE) {
            Set results = type.newSet(length, c);
            private_collectionAddOperation(array, basic, results, force);
            return results;
        }
        switch (basic) {
            case INT: {
                int[] is = (int[]) array;
                Integer[] integers = BasicEnum.toWrapperArray(force, is);
                return new CopyOnWriteArraySet<>(Arrays.asList(integers));
            }
            case LONG: {
                long[] ls = (long[]) array;
                Long[] longs = BasicEnum.toWrapperArray(force, ls);
                return new CopyOnWriteArraySet<>(Arrays.asList(longs));
            }
            case DOUBLE: {
                double[] ds = (double[]) array;
                Double[] doubles = BasicEnum.toWrapperArray(force, ds);
                return new CopyOnWriteArraySet<>(Arrays.asList(doubles));
            }
            case FLOAT: {
                float[] fs = (float[]) array;
                Float[] floats = BasicEnum.toWrapperArray(force, fs);
                return new CopyOnWriteArraySet<>(Arrays.asList(floats));
            }
            case CHAR: {
                char[] cs = (char[]) array;
                Character[] chars = BasicEnum.toWrapperArray(force, cs);
                return new CopyOnWriteArraySet<>(Arrays.asList(chars));
            }
            case BYTE: {
                byte[] bs = (byte[]) array;
                Byte[] bytes = BasicEnum.toWrapperArray(force, bs);
                return new CopyOnWriteArraySet<>(Arrays.asList(bytes));
            }
            case SHORT: {
                short[] ss = (short[]) array;
                Short[] shorts = BasicEnum.toWrapperArray(force, ss);
                return new CopyOnWriteArraySet<>(Arrays.asList(shorts));
            }
            case BOOLEAN: {
                boolean[] bs = (boolean[]) array;
                Boolean[] booleans = BasicEnum.toWrapperArray(force, bs);
                return new CopyOnWriteArraySet<>(Arrays.asList(booleans));
            }
            default: return new CopyOnWriteArraySet<>();
        }
    }



    @Note("将可迭代容器的数据转为基本类型数组")
    private static void private_copyTo(BasicEnum type, Iterable<?> src, Object tar, int length, Force force) {
        if(length == 0) return;
        int index = 0;
        switch (type) {
            case INT: {
                int[] target = (int[]) tar;
                if(force == null) {
                    for (Integer i : (Iterable<Integer>) src) {
                        if(index == length) return;
                        target[index] = (i == null) ? 0 : i;
                        index++;
                    }
                } else {
                    for (Integer i : (Iterable<Integer>) src) {
                        if(index == length) return;
                        Object o = force.force(i);
                        target[index] = (o == null) ? 0 : (Integer) o;
                        index++;
                    }
                }
            } break;

            case LONG: {
                long[] target = (long[]) tar;
                if(force == null) {
                    for (Long l : (Iterable<Long>) src) {
                        if(index == length) return;
                        target[index] = (l == null) ? 0 : l;
                        index++;
                    }
                } else {
                    for (Long l : (Iterable<Long>) src) {
                        if(index == length) return;
                        Object o = force.force(l);
                        target[index] = (o == null) ? 0 : (Long) o;
                        index++;
                    }
                }
            } break;

            case DOUBLE: {
                double[] target = (double[]) tar;
                if(force == null) {
                    for (Double d : (Iterable<Double>) src) {
                        if(index == length) return;
                        target[index] = (d == null) ? 0 : d;
                        index++;
                    }
                } else {
                    for (Double d : (Iterable<Double>) src) {
                        if(index == length) return;
                        Object o = force.force(d);
                        target[index] = (o == null) ? 0.0 : (Double) o;
                        index++;
                    }
                }
            } break;

            case FLOAT: {
                float[] target = (float[]) tar;
                if(force == null) {
                    for (Float f : (Iterable<Float>) src) {
                        if(index == length) return;
                        target[index] = (f == null) ? 0 : f;
                        index++;
                    }
                } else {
                    for (Float f : (Iterable<Float>) src) {
                        if(index == length) return;
                        Object o = force.force(f);
                        target[index] = (o == null) ? 0.0f : (Float) o;
                        index++;
                    }
                }
            } break;

            case CHAR: {
                char[] target = (char[]) tar;
                if(force == null) {
                    for (Character c : (Iterable<Character>) src) {
                        if(index == length) return;
                        target[index] = (c == null) ? '\u0000' : c;
                        index++;
                    }
                } else {
                    for (Character c : (Iterable<Character>) src) {
                        if(index == length) return;
                        Object o = force.force(c);
                        target[index] = (o == null) ? '\u0000' : (Character) o;
                        index++;
                    }
                }
            } break;

            case BYTE: {
                byte[] target = (byte[]) tar;
                if(force == null) {
                    for (Byte b : (Iterable<Byte>) src) {
                        if(index == length) return;
                        target[index] = (b == null) ? 0 : b;
                        index++;
                    }
                } else {
                    for (Byte b : (Iterable<Byte>) src) {
                        if(index == length) return;
                        Object o = force.force(b);
                        target[index] = (o == null) ? 0 : (Byte) o;
                        index++;
                    }
                }
            } break;

            case SHORT: {
                short[] target = (short[]) tar;
                if(force == null) {
                    for (Short s : (Iterable<Short>) src) {
                        if(index == length) return;
                        target[index] = (s == null) ? 0 : s;
                        index++;
                    }
                } else {
                    for (Short s : (Iterable<Short>) src) {
                        if(index == length) return;
                        Object o = force.force(s);
                        target[index] = (o == null) ? 0 : (Short) o;
                        index++;
                    }
                }
            } break;

            case BOOLEAN: {
                boolean[] target = (boolean[]) tar;
                if(force == null) {
                    for (Boolean b : (Iterable<Boolean>) src) {
                        if(index == length) return;
                        target[index] = b != null && b;
                        index++;
                    }
                } else {
                    for (Boolean b : (Iterable<Boolean>) src) {
                        if(index == length) return;
                        Object o = force.force(b);
                        target[index] = o != null && (Boolean) o;
                        index++;
                    }
                }
            } break;
        }
    }



    @Note("基本类型数组复制到包装类型数组")
    private static void private_baseCopyToWrapper(Object src, Object tar, int length, BasicEnum type, Force force) {
        if(length == 0) return;
        switch (type) {
            case INT: {
                int[] source = (int[]) src;
                Integer[] target = (Integer[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Integer) force.force(source[i]);
            } break;
            case LONG: {
                long[] source = (long[]) src;
                Long[] target = (Long[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Long) force.force(source[i]);
            } break;
            case DOUBLE: {
                double[] source = (double[]) src;
                Double[] target = (Double[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Double) force.force(source[i]);
            } break;
            case FLOAT: {
                float[] source = (float[]) src;
                Float[] target = (Float[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Float) force.force(source[i]);
            } break;
            case CHAR: {
                char[] source = (char[]) src;
                Character[] target = (Character[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Character) force.force(source[i]);
            } break;
            case SHORT: {
                short[] source = (short[]) src;
                Short[] target = (Short[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Short) force.force(source[i]);
            } break;
            case BYTE: {
                byte[] source = (byte[]) src;
                Byte[] target = (Byte[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Byte) force.force(source[i]);
            } break;
            case BOOLEAN: {
                boolean[] source = (boolean[]) src;
                Boolean[] target = (Boolean[]) tar;
                if(force == null) for (int i = 0; i < length; i++) target[i] = source[i];
                else for (int i = 0; i < length; i++) target[i] = (Boolean) force.force(source[i]);
            } break;
        }
    }



    @Note("将 src 数组的内容经过自定义处理后，拷贝到 tar 目标基本类型数组中去")
    private static void private_copyToBasicArray(Object src, Object tar, Force force, boolean srcIsWrapper, BasicEnum basic, int length) {
        if(srcIsWrapper) {
            switch (basic) {
                case INT: {
                    Integer[] source = (Integer[]) src;
                    int[] target = (int[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (int) ObjKit.asValue(source[i], 0);
                    else for (int i = 0; i < length; i++)  target[i] = (int) ObjKit.asValue(force.force(source[i]), 0);
                } break;
                case LONG: {
                    Long[] source = (Long[]) src;
                    long[] target = (long[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (long) ObjKit.asValue(source[i], 0);
                    else for (int i = 0; i < length; i++)  target[i] = (long) ObjKit.asValue(force.force(source[i]), 0);
                } break;
                case DOUBLE: {
                    Double[] source = (Double[]) src;
                    double[] target = (double[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (double) ObjKit.asValue(source[i], 0.0);
                    else for (int i = 0; i < length; i++)  target[i] = (double) ObjKit.asValue(force.force(source[i]), 0.0);
                } break;
                case FLOAT: {
                    Float[] source = (Float[]) src;
                    float[] target = (float[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (float) ObjKit.asValue(source[i], 0.0f);
                    else for (int i = 0; i < length; i++)  target[i] = (float) ObjKit.asValue(force.force(source[i]), 0.0f);
                } break;
                case CHAR: {
                    Character[] source = (Character[]) src;
                    char[] target = (char[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (char) ObjKit.asValue(source[i], 0.0f);
                    else for (int i = 0; i < length; i++)  target[i] = (char) ObjKit.asValue(force.force(source[i]), 0.0f);
                } break;
                case SHORT: {
                    Short[] source = (Short[]) src;
                    short[] target = (short[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (short) ObjKit.asValue(source[i], 0.0f);
                    else for (int i = 0; i < length; i++)  target[i] = (short) ObjKit.asValue(force.force(source[i]), 0.0f);
                } break;
                case BYTE: {
                    Byte[] source = (Byte[]) src;
                    byte[] target = (byte[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (byte) ObjKit.asValue(source[i], 0.0f);
                    else for (int i = 0; i < length; i++)  target[i] = (byte) ObjKit.asValue(force.force(source[i]), 0.0f);
                } break;
                case BOOLEAN: {
                    Boolean[] source = (Boolean[]) src;
                    boolean[] target = (boolean[]) tar;
                    if(force == null) for (int i = 0; i < length; i++) target[i] = (boolean) ObjKit.asValue(source[i], 0.0f);
                    else for (int i = 0; i < length; i++)  target[i] = (boolean) ObjKit.asValue(force.force(source[i]), 0.0f);
                } break;
            }
            return;
        }
        switch (basic) {
            case INT: {
                int[] source = (int[]) src;
                int[] target = (int[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Integer o = (Integer) force.force(source[i]);
                    target[i] = (o == null) ? 0 : o;
                }
            } break;
            case LONG: {
                long[] source = (long[]) src;
                long[] target = (long[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Long o = (Long) force.force(source[i]);
                    target[i] = (o == null) ? 0 : o;
                }
            } break;
            case DOUBLE: {
                double[] source = (double[]) src;
                double[] target = (double[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Double o = (Double) force.force(source[i]);
                    target[i] = (o == null) ? 0.0 : o;
                }
            } break;
            case FLOAT: {
                float[] source = (float[]) src;
                float[] target = (float[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Float o = (Float) force.force(source[i]);
                    target[i] = (o == null) ? 0.0f : o;
                }
            } break;
            case CHAR: {
                char[] source = (char[]) src;
                char[] target = (char[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Character o = (Character) force.force(source[i]);
                    target[i] = (o == null) ? '\u0000' : o;
                }
            } break;
            case SHORT: {
                short[] source = (short[]) src;
                short[] target = (short[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Short o = (Short) force.force(source[i]);
                    target[i] = (o == null) ? 0 : o;
                }
            } break;
            case BYTE: {
                byte[] source = (byte[]) src;
                byte[] target = (byte[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Byte o = (Byte) force.force(source[i]);
                    target[i] = (o == null) ? 0 : o;
                }
            } break;
            case BOOLEAN: {
                boolean[] source = (boolean[]) src;
                boolean[] target = (boolean[]) tar;
                if(force == null) System.arraycopy(source, 0, target, 0, length);
                else for (int i = 0; i < Math.min(source.length, target.length); i++) {
                    Boolean o = (Boolean) force.force(source[i]);
                    target[i] = o != null && o;
                }
            } break;
        }
    }
}
